﻿using IntoNails.Infrastructure.InteractionRequests;
using IntoNails.Models;
using IntoNails.Modules.CategoryManagement.InteractionRequests;
using IntoNails.Modules.CategoryManagement.ViewModels;

namespace IntoNails.Modules.CategoryManagement.Views
{
    /// <summary>
    /// Interaction logic for CreateNewCategoryPopupView.xaml
    /// </summary>
    public partial class CreateNewCategoryPopupView : CreateNewCategoryDialogRequest, IGenericInteractionView<Category>
    {
        public CreateNewCategoryPopupView()
        {
            this.InitializeComponent();

            this.ViewModel = new CreateNewCategoryPopupViewModel();
            this.DataContext = this.ViewModel;
        }

        public CreateNewCategoryPopupViewModel ViewModel { get; private set; }

        public void SetEntity(Category entity)
        {
            this.ViewModel.SetEntity(entity);
        }

        public Category GetEntity()
        {
            return this.ViewModel.GetEntity();
        }
    }
}
